home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ply15dat.zip / ROOM1.PI < prev    next >
Text File  |  1992-09-13  |  1KB  |  29 lines

  1. // Test of environment map.  We will be generating the six faces of an
  2. // environment map from <0, 0, 0>.  This will then be used as the surface
  3. // of a "reflective" sphere
  4. //
  5. // Polyray input file: Alexander Enzmann
  6.  
  7. define location <0, 0, 0>  // This is where the "reflective" sphere will be
  8. define at_vecs [<1, 0, 0>, <-1, 0, 0>, < 0, 1, 0>, < 0,-1, 0>, < 0, 0,-1>,
  9.                 < 0, 0, 1>]
  10. define up_vecs [< 0, 1, 0>, < 0, 1, 0>, < 0, 0, 1>, < 0, 0,-1>, < 0, 1, 0>,
  11.                 < 0, 1, 0>]
  12.  
  13. // Generate six frames, one for each direction of the overall environment
  14. start_frame 0
  15. end_frame 5
  16.  
  17. // Each frame generates the view in a specific direction.  The vectors
  18. // stored in the arrays "at_vecs", and "up_vecs" turn the camera in such
  19. // a way as to generate image maps correct for using in an environment map.
  20. viewpoint {
  21.    from location         // From is the center of projection for the environment
  22.    at location + at_vecs[frame]
  23.    up up_vecs[frame]
  24.    angle 90              // 90 degrees in each direction
  25.    resolution 64, 64     // Size this according to the size of the object
  26.    }
  27.  
  28. include "room2.pi"
  29.